<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
    <title>信息管理</title>
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/js/lib/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/js/lib/bootstrap/bootstrap-theme.min.css">
    <link href="<%=basePath%>static/plugins/bui/css/bs3/bui.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/css/base.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/css/module.css">
</head>
<body>
<div class="wrap" id="dtuList">
    <!-- 头部页面 -->
    <header>
        <div class="container">
            <div class="logo">
                <img src="<%=basePath%>/static/images/logo.png">

                <div class="title">
                    <h1>水务生产调度系统</h1>

                    <h3>湖边水库管理所</h3>
                </div>
            </div>
            <div class="state-message">
                <div class="nav">
                    <ul class="nav-ul">
                        <li class="nav-li"><a href="<%=basePath%>rest/web/index/toIndexList">实时监控</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/eventInfo/toEventInfoList">事件管理</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/danger/toDangerList">危险管控</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/locationLog/toLocationLogList">人员调度</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/flowDailyReport/toTimeReports">报表统计</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/architecture/toArchitectureList">设施分布</a></li>
                        <li class="nav-li dropdown clearfix composite-li">
                            <a class="active" id="compositeMenuDivider" data-toggle="dropdown" aria-haspopup="true"
                               aria-expanded="true">信息管理</a>
                            <ul class="composite-menu  dropdown-menu" aria-labelledby="compositeMenuDivider">
                                <li><a href="<%=basePath%>rest/web/information/toInformationList"
                                       class="composite-active">新增设施</a></li>
                                <li><a href="<%=basePath%>rest/web/dtu/toDtuList">DTU管理</a></li>
                                <li><a href="<%=basePath%>rest/web/device/toDeviceList">传感管理</a></li>
                            </ul>
                        </li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/sysuser/toSysuserList">用户管理</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/about/toAbout">关于我们</a></li>
                    </ul>
                </div>
                <div class="user-message">
                    <div class="dropdown clearfix">
                        <p type="button" id="dropdownMenuDivider" data-toggle="dropdown" aria-haspopup="true"
                           aria-expanded="true">
                            ${sysuser.nickName}
                            <span class="skuiwu-caret caret"></span>
                        </p>
                        <ul class="skuiwu-menu  dropdown-menu" aria-labelledby="dropdownMenuDivider">
                            <li><a href="<%=basePath%>rest/web/sysuser/toPersonal">个人中心</a></li>
                            <li><a href="<%=basePath%>rest/web/toLoginOut">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <!--内容页面 -->
    <div class="user-content content">
        <div class="container">
            <form id="searchForm" class="form-panel" action="${basepath}/rest/web/dtu/selectDtuPage">
                <div class="add-user">
                    <div class="search-input">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="请输入关键字" aria-describedby="blurBtn"
                                   name="code">
                           <button class="input-group-addon" type="submit"><img
                                    src="<%=basePath%>static/images/search.png"></button>
                        </div>
                    </div>
                    <div class="del-btn">
                        <button class="btn" onclick="delBtn()">批量删除</button>
                    </div>
                    <div class="add-btn">
                        <button class=" btn" onclick="addDtu()">新增DTU</button>
                    </div>
                </div>
            </form>
            <div class="table-responsive">
                <%--<table class="table table-bordered" id="jqGrid">--%>
                <%--</table>--%>
                <%--<div id="jqGridPager"></div>--%>
                <div id="grid"></div>
            </div>
            <div id="example" style="text-align: center;height: 30px;">
                <ul id="pageLimit"></ul>
            </div>
        </div>
    </div>
</div>
<div id="addContent" style="display:none;">
    <form id="addForm" class="form-horizontal" action="${basepath}/rest/web/dtu/insertDtu" method="post">
        <div class="input-group">
            <label><span>DTU名称：</span></label>
            <input class="form-control" type="text" name="code">
        </div>
        <div class="input-group">
            <label><span>DTU密码：</span></label>
            <input class="form-control" type="text" name="password" onkeyup="this.value=this.value.replace(/\D/g,'')"
                   onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
        </div>
        <div class="select-group input-group">
            <label><span>通讯波特率:</span></label>
            <select class="form-control" style="width: 230px;" name="baudRate">
                <option>9600</option>
            </select>
            <span style="float: right;margin:4px 25px 0 0 ;">bps</span>
        </div>
        <div class="remark-input input-group">
            <label><span>备注:</span></label>
            <textarea class="form-control" name="remark"></textarea>
        </div>
    </form>
</div>
<div id="editContent" style="display:none;">
    <form id="editForm" class="form-horizontal" action="${basepath}/rest/web/dtu/updateDtu" method="post">
        <input type="hidden" name="dtuId" >
        <div class="input-group">
            <label><span>DTU名称：</span></label>
            <input class="form-control" type="text" name="code">
        </div>
        <div class="input-group">
            <label><span>DTU密码：</span></label>
            <input class="form-control" type="text" name="password" onkeyup="this.value=this.value.replace(/\D/g,'')"
                   onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
        </div>
        <div class="select-group input-group">
            <label><span>通讯波特率:</span></label>
            <select class="form-control" style="width: 230px;" name="baudRate">
                <option>9600</option>
            </select>
            <span style="float: right;margin:4px 25px 0 0 ;">bps</span>
        </div>
        <div class="remark-input input-group">
            <label><span>备注:</span></label>
            <textarea class="form-control" name="remark"></textarea>
        </div>
    </form>
</div>

<script type="text/javascript" src="<%=basePath%>static/js/lib/jquery.min.js"></script>
<!--layer-->
<%--<script src="<%=basePath%>static/plugins/layer/layer.js"></script>--%>
<!--bootstrap-->
<script type="text/javascript" src="<%=basePath%>static/js/lib/bootstrap/bootstrap.min.js"></script>
<!--bui-->
<script src="<%=basePath%>static/plugins/bui/bui.js"></script>
<script type="text/javascript" src="<%=basePath%>static/js/index.js"></script>
<script type="text/javascript" src="<%=basePath%>static/js/dtuList.js"></script>
</body>
</html>
